import service from '@/utils/request'

export const useDepartmentApi = (id: Number) => {
	return service.get('/sys/department/' + id)
}

export const useDepartmentSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sys/department', dataForm)
	} else {
		return service.post('/sys/department', dataForm)
	}
}

export const useDepartmentListApi = () => {
	return service.get('/sys/department/list')
}

export const departmentMerchantOrgApi = (data: any) => {
	return service.post('/sys/department/departmentMerchantOrg', data)
}
